# coding=utf-8
from django.contrib import admin
from db.models import Product, OperationLog


class ProductAdmin(admin.ModelAdmin):
    list_display = ('number', 'name', 'model_name', 'category', 
                    'unit', 'location', 'count', 'remark')
    search_fields = ('number', 'name', 'category') # 快速查询栏
    list_filter = ('model_name', 'category', 'unit') # 过滤器
    ordering = ('category',)




admin.site.register(Product, ProductAdmin)
admin.site.register(OperationLog)